You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

check-types-mini

Package Overview
Dependencies
Maintainers
1
Versions
199
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check-types-mini

Validate options object

8.0.22
latest
Source
npmnpm
Version published
Weekly downloads
1.4K
43.34%
Maintainers
1
Weekly downloads
 
Created
Source

check-types-mini

Validate options object

page on codsen.com page on npm page on github Downloads per month changelog MIT Licence

Install

This package is pure ESM. If you're not ready yet, install an older version of this program, 6.1.0 (npm i check-types-mini@6.1.0).

npm i check-types-mini

Quick Take

import { strict as assert } from "assert";

import { checkTypesMini } from "check-types-mini";

assert.throws(
  () => {
    checkTypesMini(
      {
        // object to check
        option1: "setting1",
        option2: "false",
        option3: false,
      },
      {
        // reference defaults object
        option1: "setting1",
        option2: false,
        option3: false,
      },
    );
  },
  (err) => {
    assert(/not boolean but string/.test(err));
    return true;
  },
);

Documentation

Please visit codsen.com for a full description of the API.

Contributing

To report bugs or request features or assistance, raise an issue on GitHub.

Licence

MIT License.

Copyright © 2010-2025 Roy Revelt and other contributors.

ok codsen star

Keywords

compare

FAQs

Package last updated on 02 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts